using System;
using Microsoft.VisualStudio.Modeling;

namespace DslCrossModelFramework {
    public interface IDynamicStoreModelFile : IModelFile {
        bool HasDynamicStore{ get;}
        Store DynamicStore{ get; }
        void RegisterDynamicStore(Store store);
        event EventHandler<DynamicModelFileEventArgs> DynamicStoreFound;
        event EventHandler<DynamicModelFileEventArgs> StoreDisposed;
    }

    public class DynamicModelFileEventArgs : EventArgs {
        private Store store;

        public Store Store {
            get { return store; }
            set { store = value; }
        }

        private IModelFile modelFile;

        public IModelFile ModelFile {
            get { return modelFile; }
            set { modelFile = value; }
        }

        public DynamicModelFileEventArgs(Store store, IModelFile modelFile) {
            this.store = store;
            this.modelFile = modelFile;
        }
    }
}